package org.thss.petri.gef.figures;

import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.MidpointLocator;
import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.PositionConstants;

public class ArcFigure extends PolylineConnection {
	private Label label;
	
	public ArcFigure() {
		setTargetDecoration(new PolygonDecoration());
		MidpointLocator locator = new MidpointLocator(this, 0);
		locator.setRelativePosition(PositionConstants.NORTH);
		label = new Label();
		add(label, locator);
	}
	
	public void setWeight(int weight) {
		label.setText(Integer.toString(weight));
	}
}
